<?php

namespace App\Http\Controllers\v1\algorithmAndDataStruct;

use App\Http\Controllers\Controller;

/*
 * 双向链表
 *链表节点，包含一个数据项和指向下一个节点的指针
 */
class Node extends Controller
{
    public $previous;
    public $data;
    public $next;

    public function __construct($data)
    {
        $this->previous = null;
        $this->data = $data;
        $this->next = null;
    }
}